<div class="content-header">
    <h2 class="content-title">用户管理</h2>
    <span class="layui-breadcrumb">
	  <a href="#!home">首页</a>
	  <a><cite>用户管理</cite></a>
	</span>
</div>

<div>
    <div class="layui-form toolbar">
        搜索：
        <select id="searchKey">
            <option value="">-请选择-</option>
            <option value="pk_id">ID</option>
            <option value="number">学号</option>
            <option value="nickname">用户名</option>
            <option value="phone">手机号</option>
        </select>&emsp;
        <input id="searchValue" class="layui-input search-input" type="text" placeholder="输入搜索内容"/>&emsp;
        <button id="searchBtn" class="layui-btn search-btn"><i class="layui-icon">&#xe615;</i>搜索</button>&emsp;
        <button id="addBtn" class="layui-btn search-btn"><i class="layui-icon">&#xe654;</i>添加</button>
    </div>

    <table class="layui-table" id="table" lay-filter="table"></table>
</div>

<!-- 表单弹窗 -->
<script type="text/html" id="addModel">
    <form id="editForm" class="layui-form model-form" action="">

        <!--<div class="layui-form-item">-->
            <!--<label class="layui-form-label">ID</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" name="id" required lay-verify="required" placeholder=""-->
                       <!--autocomplete="off" class="layui-input">-->
            <!--</div>-->

        <!--</div>-->

        <div class="layui-form-item">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <input type="text" name="nickname" required lay-verify="required" placeholder="请输入昵称"
                       autocomplete="off" class="layui-input">
            </div>

        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" id="sexMan" name="gender" value="MALE" title="男">
                <input type="radio" id="sexWoman" name="gender" value="FEMALE" title="女" checked>
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-inline">
                <input type="text" name="email" required lay-verify="required|email" placeholder="请输入邮箱"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机</label>
            <div class="layui-input-inline">
                <input type="text" name="phone" required lay-verify="required|phone" placeholder=""
                       autocomplete="off" class="layui-input">
            </div>
        </div>

        <!--<div class="layui-form-item">-->
            <!--<label class="layui-form-label">学号</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" name="number" required lay-verify="required" placeholder="请输入学号" autocomplete="off"-->
                       <!--class="layui-input">-->
            <!--</div>-->
        <!--</div>-->
        <input type="hidden" name="id">
        <div class="layui-form-item layui-input-block">
            <button class="layui-btn layui-btn-primary" type="button" id="btnCancel">取消</button>
            <button class="layui-btn" lay-filter="btnSubmit" lay-submit>保存</button>
        </div>
    </form>
</script>
<!-- 表格操作列 -->
<script type="text/html" id="barTpl">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">编辑</a>
    <!--<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>-->
</script>
<!-- 表格状态列 -->
<script type="text/html" id="statusTpl">
    <input type="checkbox" name="sex" lay-filter="statusCB" value="{{d.userId}}" lay-skin="switch"
           lay-text="正常|锁定" {{ d.userStatus=== 0 ? 'checked' : '' }}/>
    <!--<input type="checkbox" name="sex" lay-filter="statusCB" value="{{d.userId}}" lay-skin="switch"-->
    <!--lay-text="正常|锁定" />-->
</script>
<!--注册表单弹窗中 下拉选择 学校 框 模板-->
<script type="text/html" id="selectSchoolTpl">
    <option value="">-请选择学校-</option>
    {{# layui.each(d.list,function(index,item){  }}
    <option value="{{ item.name }}">{{ item.name }}</option>
    {{# });  }}
</script>

<!--注册表单弹窗中 下拉选择 校区 框 模板-->
<script type="text/html" id="selectSubCampusTpl">
    <option value="">-请选择校区-</option>
    {{# layui.each(d.list,function(index,item){  }}
    <option value="{{ item.scName }}">{{ item.scName }}</option>
    {{# });  }}
</script>
<script type="text/javascript" src="../../js/admin/user.js"></script>